//
//  ZBFancyTableViewCell.h
//  ZBFancyTableView
//
//  Created by xzb on 2020/1/12.
//

#import <UIKit/UIKit.h>

/*
 定制化实现Cell

 config.cell(@"<cell>").cls(@"ZBFancyTableViewCell");

 maker.row(@"<cell>")
 .model(@{ @"text" : [NSString stringWithFormat:@"current_idx: %ld", (long)idx] })
 .height(44)
 .initializeViewBlock(^(ZBFancyTableViewCell *cell) {
 __block UILabel *label = [[UILabel alloc] init];

 label.backgroundColor = [UIColor cyanColor];
 [cell.contentView addSubview:label];

 cell.updateViewBlock = ^(UITableViewCell *cell, id data) {
 label.text = data[@"text"];
 };
 cell.layoutSubviewsBlock = ^(ZBFancyTableViewCell *cell) {
 label.frame = CGRectMake(15, 0, 200, 44);
 };

 });
 */
@interface ZBFancyTableViewCell : UITableViewCell

@property (nonatomic, strong) id cellRawData;
@property (nonatomic, strong) NSIndexPath *indexPath;

//初始化
@property (nonatomic, copy) void (^ initializeViewBlock)(ZBFancyTableViewCell *cell);
//重置view
@property (nonatomic, copy) void (^ resetViewBlock)(ZBFancyTableViewCell *cell);
//更新view
@property (nonatomic, copy) void (^ updateViewBlock)(ZBFancyTableViewCell *cell, id data);
//自定义布局
@property (nonatomic, copy) void (^ layoutSubviewsBlock)(ZBFancyTableViewCell *cell);

@end
